<template>
  <div class="popup flex-center flex-align-items-center">
    <div class="main">
      <div class="main-header">
        <p>站内信</p>
        <i class="iconfont icon-guanbi" @click="close"></i>
      </div>
      <div class="detail">
        <p class="name font-18-B">{{ detail.name }}</p>
        <p class="time font-12">{{ detail.time }}</p>
        <div v-html="detail.content" class="content"></div>
        <div class="flex btns">
          <p class="font-14 pointer" @click="close">关闭</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { defineProps, defineEmits, ref } from 'vue';

const props = defineProps(['id']);
const emit = defineEmits(['close']);
console.log(props)

const detail = ref({
  name: '产品功能更新说明-12月21日发布',
  time: '2023-12-22 10:00:00',
  content: '11111111111111111'
});

const close = () => {
  emit('close');
}
</script>

<style lang="less" scoped>
.popup {
  &::before {
    opacity: 0.2;
  }

  .main {
    position: relative;
    z-index: 10;
    width: 800px;
    border-radius: 4px;
    background: #fff;

    .detail {
      padding: 24px;

      .name {
        text-align: center;
        color: #333;
        margin-bottom: 8px;
      }

      .time {
        text-align: right;
        color: #666;
        margin-bottom: 8px;
      }

      .content {
        max-height: 433px;
        padding: 24px 16px;
        border-radius: 4px;
        border: 1px solid #dcdee0;
        background: hsla(210, 6%, 87%, .1);
        overflow-y: auto;
        margin-bottom: 24px;
      }

      .btns {
        justify-content: end;

        p {
          width: 64px;
          height: 32px;
          border: 1px solid @main-color;
          border-radius: 2px;
          color: @main-color;
          text-align: center;
          line-height: 30px;
        }
      }
    }
  }
}
</style>
